package i2.application.fmw.exceptions;

import javax.validation.ConstraintViolation;



public class ValidationMessage {

	private String key;
	private String message;
	
	public ValidationMessage(){
	}

	public ValidationMessage(String key, String message){
		this.key = key;
		this.message = message;
	}
	
	public ValidationMessage(ConstraintViolation<?> cons) {
		this.key = cons.getRootBeanClass().getSimpleName().toLowerCase()+"."+cons.getPropertyPath().toString();
		this.message = cons.getMessage();
	}
	
	public String getKey() {
		return key;
	}
	
	public void setKey(String key) {
		this.key = key;
	}
	
	public String getMessage() {
		return message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	
}
